<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>ZuiLib接口文档</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>zui</h1>


<h2>Contents</h2>
<ul>
<li><a href="#______">目录 </a></li>
<li><a href="#View">View </a></li>
<li><a href="#Button">Button </a></li>
<li><a href="#PageControl">PageControl </a></li>
<li><a href="#Progress">Progress </a></li>
<li><a href="#SegmentedControl">SegmentedControl </a></li>
<li><a href="#Slider">Slider </a></li>
<li><a href="#Stepper">Stepper </a></li>
<li><a href="#Switch">Switch </a></li>
<li><a href="#ActivityIndicatorView">ActivityIndicatorView </a></li>
<li><a href="#ScrollView">ScrollView </a></li>
<li><a href="#AutoCollectionView">AutoCollectionView </a></li>
<li><a href="#Cell">Cell </a></li>
<li><a href="#CollectionViewCell">CollectionViewCell </a></li>
<li><a href="#CollectionView">CollectionView </a></li>
<li><a href="#DatePickerView">DatePickerView </a></li>
<li><a href="#GifView">GifView </a></li>
<li><a href="#ImageView">ImageView </a></li>
<li><a href="#Label">Label </a></li>
<li><a href="#LinearView">LinearView </a></li>
<li><a href="#ListViewCell_______Cell___Cell________________">ListViewCell继承[Cell](#Cell)的所有属性 </a></li>
<li><a href="#ListView">ListView </a></li>
<li><a href="#PageView">PageView </a></li>
<li><a href="#PickerView">PickerView </a></li>
<li><a href="#PullToRefreshView">PullToRefreshView </a></li>
<li><a href="#RichLabel">RichLabel </a></li>
<li><a href="#Scale9ImageView">Scale9ImageView </a></li>
<li><a href="#TableView">TableView </a></li>
<li><a href="#WaterfallViewCell">WaterfallViewCell </a></li>
<li><a href="#WaterfallView">WaterfallView </a></li>
<li><a href="#WebView">WebView </a></li>
<li><a href="#TextView">TextView </a></li>
<li><a href="#TextField">TextField </a></li>
<li><a href="#ClippingView">ClippingView </a></li>
<li><a href="#CaptureView">CaptureView </a></li>
<li><a href="#QRCodeScanView">QRCodeScanView </a></li>
<li><a href="#QRCodeView">QRCodeView </a></li>
<li><a href="#TouchView">TouchView </a></li>
<li><a href="#FlexLayout">FlexLayout </a></li>
<li><a href="#ViewController">ViewController </a></li>
<li><a href="#Event">Event </a></li>
<li><a href="#Skin">Skin </a></li>
</ul>


<h2>Topics</h2>
<ul class="">
  <li><a href="../topics/readme.md.html">readme</a></li>
  <li><strong>layout</strong></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
  <li><a href="../index.html">Control</a></li>
</ul>

</div>

<div id="content">


<p>﻿# 界面布局文档</p>

<p><span id="contents"></span></p>

<p><a name="______"></a></p>
<h2>目录</h2>

<h3>控件</h3>

<ol>
    <li><a href="#View">View</a></li>
    <li><a href="#Button">Button</a></li>
    <li><a href="#PageControl">PageControl</a></li>
    <li><a href="#Progress">Progress</a></li>
    <li><a href="#SegmentedControl">SegmentedControl</a></li>
    <li><a href="#Slider">Slider</a></li>
    <li><a href="#Stepper">Stepper</a></li>
    <li><a href="#Switch">Switch</a></li>
    <li><a href="#ActivityIndicatorView">ActivityIndicatorView</a></li>
    <li><a href="#ScrollView">ScrollView</a></li>
    <li><a href="#CollectionViewCell">CollectionViewCell</a></li>
    <li><a href="#CollectionView">CollectionView</a></li>
    <li><a href="#AutoCollectionView">AutoCollectionView</a></li>
    <li><a href="#DatePickerView">DatePickerView</a></li>
    <li><a href="#GifView">GifView</a></li>
    <li><a href="#ImageView">ImageView</a></li>
    <li><a href="#Label">Label</a></li>
    <li><a href="#Cell">Cell</a></li>
    <li><a href="#LinearView">LinearView</a></li>
    <li><a href="#ListViewCell">ListViewCell</a></li>
    <li><a href="#ListView">ListView</a></li>
    <li><a href="#PageView">PageView</a></li>
    <li><a href="#PickerView">PickerView</a></li>
    <li><a href="#PullToRefreshView">PullToRefreshView</a></li>
    <li><a href="#RichLabel">RichLabel</a></li>
    <li><a href="#Scale9ImageView">Scale9ImageView</a></li>
    <li><a href="#TableView">TableView</a></li>
    <li><a href="#WaterfallViewCell">WaterfallViewCell</a></li>
    <li><a href="#WaterfallView">WaterfallView</a></li>
    <li><a href="#WebView">WebView</a></li>
    <li><a href="#TextView">TextView</a></li>
    <li><a href="#TextField">TextField</a></li>
    <li><a href="#CaptureView">CaptureView</a></li>
    <li><a href="#QRCodeScanView">QRCodeScanView</a></li>
    <li><a href="#QRCodeView">QRCodeView</a></li>
    <li><a href="#TouchView">TouchView</a></li>
    <li><a href="#ClippingView">ClippingView</a></li>
    <li><a href="#FlexLayout">FlexLayout</a></li>
</ol>

<h3>其他</h3>

<ol>
    <li><a href="#Event">Event</a></li>
    <li><a href="#Skin">Skin</a></li>
    <li><a href="#ViewController">ViewController</a></li>
</ol>


<hr/>

<p><span id="View"></span>
<a name="View"></a></p>
<h2>View</h2>

<p>所有控件的父类</p>

<h3>属性</h3>

<ul>
    <li>frame</li>
    <li>size</li>
    <li>center</li>
    <li>centerorigin</li>
    <li>origin</li>
    <li>nativesize</li>
    <li>nativewidth  CALinearView计算高度宽度时使用该参数,默认值为自适应大小</li>
    <li>nativeheight  CALinearView计算高度宽度时使用该参数,默认值为自适应大小</li>
    <li>layout</li>
    <li>visible</li>
    <li>rotation</li>
    <li>rotationx</li>
    <li>rotationy</li>
    <li>tag</li>
    <li>texttag</li>
    <li>color</li>
    <li>zorder</li>
    <li>vertexz</li>
    <li>scalex</li>
    <li>scaley</li>
    <li>scale</li>
    <li>skewx</li>
    <li>skewy</li>
    <li>anchor</li>
    <li>anchorpoint</li>
    <li>bounds</li>
    <li>style flex布局的css样式的配置</li>
</ul>


<h3>style样式属性</h3>

<p>参考链接http://www.oschina.net/news/73442/google-flexbox-layout</p>

<ol>
    <li><p>direction 方向值可以为</p>

<pre>
- ltr
- rtl
- inherit
</pre>
</li>
    <li><p>flex-direction</p>

<pre>
属性决定主轴的方向（即项目的排列方向）。类似 LinearLayout 的 vertical 和 horizontal。


- row: 主轴为水平方向，起点在左端。
- row-reverse：主轴为水平方向，起点在右端。
- column：主轴为垂直方向，起点在上沿。
- column-reverse：主轴为垂直方向，起点在下沿。
</pre>
</li>
    <li><p>justify-content</p>

<pre>
justifyContent属性定义了项目在主轴上的对齐方式。

- flex-start：左对齐
- flex-<span class="keyword">end</span>：右对齐
- center： 居中
- space-between：两端对齐，项目之间的间隔都相等。
- space-around：每个项目两侧的间隔相等。所以，项目之间的间隔比项目与边框的间隔大一倍。
</pre>
</li>
    <li><p>align-content</p>

<pre>
alignContent属性定义了多根轴线的对齐方式。如果项目只有一根轴线，该属性不起作用。

- stretch：轴线占满整个交叉轴。
- center：与交叉轴的中点对齐。
- flex-start：与交叉轴的起点对齐。
- flex-<span class="keyword">end</span>：与交叉轴的终点对齐。
</pre>
</li>
    <li><p>align-items</p>

<pre>
alignItems属性定义项目在副轴轴上如何对齐。

- stretch：如果项目未设置高度或设为auto，将占满整个容器的高度。
- center：交叉轴的中点对齐。
- flex-start：交叉轴的起点对齐。
- flex-<span class="keyword">end</span>：交叉轴的终点对齐。
</pre>
</li>
    <li><p>align-self</p>

<pre>
layout_alignSelf  属性允许单个子元素有与其他子元素不一样的对齐方式，可覆盖 alignItems 属性。默认值为auto，表示继承父元素的 alignItems 属性，如果没有父元素，则等同于stretch。
该属性可能取<span class="number">6</span>个值，除了auto，其他都与align-items属性完全一致。

- auto
- stretch
- center
- flex-start
- flex-<span class="keyword">end</span>
</pre>
</li>
    <li><p>position</p>

<pre>
- absolute
- relative
</pre>
</li>
    <li><p>flex-wrap</p>

<pre>
默认情况下 Flex 跟 LinearLayout 一样，都是不带换行排列的，但是flexWrap属性可以支持换行排列。有三个值：

- nowrap：不换行
- wrap：按正常方向换行
</pre>
</li>
    <li><p>overflow</p>

<pre>
- visible
- hidden
</pre>
</li>
    <li><p>flex</p>

<pre>

属性定义项目的放大比例，默认为<span class="number">0</span>，即如果存在剩余空间，也不放大。跟 LinearLayout 中的weight属性一样。
如果所有项目的 flex  属性都为<span class="number">1</span>，则它们将等分剩余空间（如果有的话）。如果一个项目的 flex  属性为<span class="number">2</span>，其他项目都为<span class="number">1</span>，则前者占据的剩余空间将比其他项多一倍。
</pre>
</li>
    <li><p>margin </p>

<pre>
控件的外边距表示如下：
margin:<span class="number">10</span> <span class="number">5</span> <span class="number">15</span> <span class="number">20</span> 表示
上外边距是 <span class="number">10</span>px
右外边距是 <span class="number">5</span>px
下外边距是 <span class="number">15</span>px
左外边距是 <span class="number">20</span>px
</pre>
</li>
    <li><p>padding</p>

<pre>
控件的内边距表示如下：
margin:<span class="number">10</span> <span class="number">5</span> <span class="number">15</span> <span class="number">20</span> 表示
上内边距是 <span class="number">10</span>px
右内边距是 <span class="number">5</span>px
下内边距是 <span class="number">15</span>px
左内边距是 <span class="number">20</span>px
</pre>
</li>
    <li><p>border</p></li>
    <li><p>top</p></li>
    <li><p>bottom</p></li>
    <li><p>left</p></li>
    <li><p>right</p></li>
    <li><p>width</p>

<pre>
控件的宽度
</pre>
</li>
    <li><p>height</p>

<pre>
控件的高度
</pre>
</li>
    <li><p>max-width</p></li>
    <li><p>max-height</p></li>
    <li><p>min-width</p></li>
    <li><p>min-height</p></li>
</ol>

<hr/>

<p><span id="Button"></span>
<a name="Button"></a></p>
<h2>Button</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li><p>type </p>
    <blockquote>
        <p>值为custom,square,round 默认为round</p>
    </blockquote></li>
    <li><p>locked </p></li>
    <li><p>normalimage</p></li>
    <li><p>highlighedimage</p></li>
    <li><p>disabledimage</p></li>
    <li><p>selectedimage</p></li>
    <li><p>bknormalimage</p></li>
    <li><p>bkhighlighedimage</p></li>
    <li><p>bkdisabledimage</p></li>
    <li><p>bkselectedimage</p></li>
    <li><p>fontsize</p></li>
    <li><p>fontname</p></li>
    <li><p>titleoffset</p></li>
    <li><p>normaltext</p></li>
    <li><p>highlightedtext</p></li>
    <li><p>selectedtext</p></li>
    <li><p>disabledtext</p></li>
    <li><p>normaltitlecolor</p></li>
    <li><p>highlightedtitlecolor</p></li>
    <li><p>selectedtitlecolor</p></li>
    <li><p>disabledtitlecolor</p></li>
    <li><p>imageoffset</p></li>
    <li><p>imagesize</p></li>
    <li><p>state</p>
    <blockquote>
        <p>值为disabled，highlighted，selected，normal</p>
    </blockquote></li>
</ul>


<h3>事件</h3>

<ul>
    <li>touchDown (button,point)</li>
    <li>touchDownRepeat (button,point)</li>
    <li>touchMoved (button,point)</li>
    <li>touchMovedOutSide (button,point)</li>
    <li>touchUpInSide (button,point)</li>
    <li>touchUpOutSide (button,point)</li>
    <li>touchLongPress (button,point)</li>
    <li>touchCancelled (button,point)</li>
</ul>

<hr/>

<p><span id="PageControl"></span>
<a name="PageControl"></a></p>
<h2>PageControl</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li><p>pages</p></li>
    <li><p>current</p></li>
    <li><p>single</p></li>
    <li><p>deferscurrentdisplay</p></li>
    <li><p>indicatortintcolor</p></li>
    <li><p>currentindicatortintcolor</p></li>
    <li><p>indicatorimage</p></li>
    <li><p>currindicatorimage</p></li>
    <li><p>style</p>
    <blockquote>
        <p>值对应CAPageControlStyle</p>
    </blockquote></li>
    <li><p>touchenabled</p></li>
</ul>

<h3>事件</h3>

<ul>
    <li>touchValueChanged (pageControl,point)</li>
</ul>

<hr/>

<p><span id="Progress"></span>
<a name="Progress"></a></p>
<h2>Progress</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>progress</li>
    <li>tintcolor</li>
    <li>trackcolor</li>
    <li>tintimage</li>
    <li>trackimage</li>
</ul>

<h3>事件</h3>

<ul>
    <li>touchValueChanged (pageControl,point)</li>
</ul>

<hr/>

<p><span id="SegmentedControl"></span>
<a name="SegmentedControl"></a></p>
<h2>SegmentedControl</h2>

<p>继承<a href="#View">View</a>的所有属性，包含SegmentedItem标签
SegmentedItem标签属性如下：</p>

<h3>SegmentedItem属性</h3>

<ul>
    <li>imagesize </li>
    <li>title</li>
    <li>normalimage</li>
    <li>selectedimage</li>
    <li>offset</li>
    <li>enable</li>
</ul>


<h3>属性</h3>

<ul>
    <li>count 包含多少项</li>
    <li>selected</li>
    <li>bkimage 背景图片</li>
    <li>segmentitembkimage 选中时的背景图片</li>
    <li>titlecolor</li>
    <li>titleselectedcolor</li>
    <li>imagecolor</li>
    <li>imageselectedcolor</li>
    <li>tintcolor</li>
    <li>fontsize</li>
    <li>fontname</li>
</ul>


<h3>事件</h3>

<ul>
    <li>onSelect (segmentedControl,index)</li>
</ul>

<hr/>

<p><span id="Slider"></span>
<a name="Slider"></a></p>
<h2>Slider</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>value</li>
    <li>minvalue</li>
    <li>maxvalue</li>
    <li>trackheight</li>
    <li>mintracktracktintimage</li>
    <li>maxtracktracktintimage</li>
    <li>thumbtintimage</li>
</ul>

<h3>事件</h3>

<ul>
    <li>touchUpInSide (Slider,point)</li>
    <li>touchValueChanged (Slider,point)</li>
</ul>

<hr/>

<p><span id="Stepper"></span>
<a name="Stepper"></a></p>
<h2>Stepper</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>continuous</li>
    <li>autorepeat</li>
    <li>wraps</li>
    <li>value</li>
    <li>minvalue</li>
    <li>maxvalue</li>
    <li>stepvalue</li>
    <li>bknormalimage</li>
    <li>bkhighlighedimage</li>
    <li>bkdisabledimage</li>
    <li>bkselectedimage</li>
    <li>incnormalimage</li>
    <li>inchighlighedimage</li>
    <li>incdisabledimage</li>
    <li>incselectedimage</li>
    <li>decnormalimage</li>
    <li>dechighlighedimage</li>
    <li>decdisabledimage</li>
    <li>decselectedimage</li>
    <li>dividercolor</li>
    <li>toucheffect</li>
</ul>


<h3>事件</h3>

<ul>
    <li>touchValueChanged (Slider,point)</li>
</ul>

<hr/>

<p><span id="Switch"></span>
<a name="Switch"></a></p>
<h2>Switch</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>ison</li>
    <li>onimage</li>
    <li>offimage</li>
    <li>thumbtintimage</li>
</ul>

<h3>事件</h3>

<ul>
    <li>touchValueChanged (Switch,point)</li>
</ul>

<hr/>

<p><span id="ActivityIndicatorView"></span>
<a name="ActivityIndicatorView"></a></p>
<h2>ActivityIndicatorView</h2>
<p>转菊花控件，继承<a href="#View">View</a>的所有属性，包含子控件IndicatorView，BackView</p>

<h3>属性</h3>

<ul>
    <li><p>timesonecycle</p></li>
    <li><p>cycletime</p></li>
    <li><p>style</p>
    <blockquote>
        <p>CAActivityIndicatorViewStyle</p>
    </blockquote></li>
    <li><p>mintime</p></li>
</ul>

<h3>事件</h3>

<ul>
    <li>onCancel (ActivityIndicatorView)</li>
</ul>

<hr/>

<p><span id="ScrollView"></span>
<a name="ScrollView"></a></p>
<h2>ScrollView</h2>
<p>滚动视图，继承<a href="#View">View</a>的所有属性，包含子控件<a href="#PullToRefreshView">HeaderRefreshView</a>，<a href="#PullToRefreshView">FooterRefreshView</a></p>

<h3>属性</h3>

<ul>
    <li><p>offset</p></li>
    <li><p>bkimage</p></li>
    <li><p>bkcolor</p></li>
    <li><p>touchenabledatsubviews</p></li>
    <li><p>showsindicators</p></li>
    <li><p>showshoriindicator 显示水平滚动条</p></li>
    <li><p>showsvertindicator 显示垂直滚动条</p></li>
    <li><p>bounces</p></li>
    <li><p>bouncehori</p></li>
    <li><p>bouncevert</p></li>
    <li><p>minzoom</p></li>
    <li><p>maxzoom</p></li>
    <li><p>zoom</p></li>
    <li><p>viewsize</p></li>
    <li><p>multitouch</p>
    <blockquote>
        <p>值对应CAScrollView::MultitouchGesture</p>
    </blockquote></li>
    <li><p>switchpcmode </p></li>
</ul>

<h3>事件</h3>

<ul>
    <li>onDidMoved (ScrollView)</li>
    <li>onStopMoved (ScrollView)</li>
    <li>willBeginDragging (ScrollView)</li>
    <li>onDragging (ScrollView)</li>
    <li>onDidEndDragging (ScrollView)</li>
    <li>onDidZoom (ScrollView)</li>
    <li>onHeaderBeginRefreshing (ScrollView)</li>
    <li>onFooterBeginRefreshing (ScrollView)</li>
    <li>touchUpWithoutMoved (ScrollView)</li>
</ul>

<hr/>

<p><span id="AutoCollectionView"></span>
<a name="AutoCollectionView"></a></p>
<h2>AutoCollectionView</h2>
<p>继承<a href="#ScrollView">ScrollView</a>的所有属性，包含子控件<a href="#PullToRefreshView">HeaderRefreshView</a>，<a href="#PullToRefreshView">FooterRefreshView</a></p>

<h3>属性</h3>

<ul>
    <li><p>allowselection</p></li>
    <li><p>allowmultiselection</p></li>
    <li><p>showindicators</p></li>
    <li><p>headerheight</p></li>
    <li><p>footerheight</p></li>
    <li><p>orientation </p>
    <blockquote>
        <p>值对应CAAutoCollectionView::Orientation</p>
    </blockquote></li>
    <li><p>cellhorialign</p>
    <blockquote>
        <p>值对应CAAutoCollectionView::CellHoriAlign</p>
    </blockquote></li>
    <li><p>cellvertalign</p>
    <blockquote>
        <p>值对应CAAutoCollectionView::CellVertAlign</p>
    </blockquote></li>
    <li><p>horicellinterval</p></li>
    <li><p>vertcellinterval</p></li>
    <li><p>horimargins</p></li>
    <li><p>vertmargins</p></li>
    <li><p>alwaystopsectionheader</p></li>
    <li><p>alwaysbottomsectionfooter</p></li>
    <li><p>switchpcmode</p></li>
</ul>

<h3>事件</h3>

<ul>
    <li>didSelectCellAtIndexPath (AutoCollectionView,sectionIdx,itemIdx)</li>
    <li>didDeselectCellAtIndexPath (AutoCollectionView,sectionIdx,itemIdx)</li>
    <li>cellAtIndex (AutoCollectionView,size,sectionIdx,itemIdx)</li>
    <li>sizeForItemAtIndexPath (AutoCollectionView,sectionIdx,itemIdx)</li>
    <li>numberOfItemsInSection(AutoCollectionView,sectionIdx)</li>
    <li>numberOfSections(AutoCollectionView)</li>
    <li>sectionViewForHeaderInSection (AutoCollectionView,viewSize,sectionIdx)</li>
    <li>heightForHeaderInSection (AutoCollectionView,sectionIdx)</li>
    <li>sectionViewForFooterInSection (AutoCollectionView,viewSize,sectionIdx)</li>
    <li>heightForFooterInSection (AutoCollectionView,sectionIdx)</li>
    <li>willDisplayCellAtIndex (AutoCollectionView,CollectionViewCell,sectionIdx,itemIdx)</li>
</ul>

<hr/>

<p><span id="Cell"></span>
<a name="Cell"></a></p>
<h2>Cell</h2>

<p>继承<a href="#View">View</a>的所有属性，可以包含子控件。</p>

<h3>属性</h3>

<ul>
    <li>identifier</li>
    <li>controlstateeffect</li>
    <li>allowsselected</li>
    <li>state
    > 值对应CAControlState</li>
    <li>bkview 背景视图
    > 支持的写法
    > scale9='scale9.png' inset='4,4,4,4'
    > color='#ffffffff' frame='0,0,33,33'
    > image='test2.png'</li>
    <li>normalbkcolor 普通状态背景颜色</li>
    <li>highlightedbkcolor 高亮状态背景颜色</li>
    <li>selectedbkcolor 选中状态背景颜色</li>
    <li>disabledbkcolor 禁用状态背景颜色</li>
</ul>

<p><span id="CollectionViewCell"></span>
<a name="CollectionViewCell"></a></p>
<h2>CollectionViewCell</h2>

<p>继承<a href="#Cell">Cell</a>的所有属性</p>

<hr/>

<p><span id="CollectionView"></span>
<a name="CollectionView"></a></p>
<h2>CollectionView</h2>

<p>继承<a href="#ScrollView">ScrollView</a>的所有属性，包含子控件<a href="#PullToRefreshView">HeaderRefreshView</a>，<a href="#PullToRefreshView">FooterRefreshView</a></p>

<h3>属性</h3>

<ul>
    <li>allowselection</li>
    <li>allowmultiselection</li>
    <li>showsindicators</li>
    <li>headerheight </li>
    <li>footerheight</li>
    <li>horiinterval</li>
    <li>vertinterval</li>
    <li>alwaystopsectionheader</li>
    <li>alwaysbottomsectionfooter</li>
    <li>switchpcmode</li>
</ul>

<hr/>

<p><span id="DatePickerView"></span>
<a name="DatePickerView"></a></p>
<h2>DatePickerView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li><p>mode</p>
    <blockquote>
        <p>值对应CADatePickerMode</p>
    </blockquote></li>
    <li><p>date</p></li>
</ul>

<h3>事件</h3>

<ul>
    <li>didSelectRow (DatePickerView,{sec=0,min=0,hour=12,mday=10,mon=1,year=2017,wday=4,isdst=0})</li>
</ul>

<hr/>

<p><span id="GifView"></span>
<a name="GifView"></a></p>
<h2>GifView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>times</li>
    <li>forever</li>
</ul>

<hr/>

<p><span id="ImageView"></span>
<a name="ImageView"></a></p>
<h2>ImageView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>image</li>
    <li>imagesync</li>
    <li>imagerect</li>
    <li>scaletype</li>
    <li>duration</li>
    <li>repeatcount</li>
</ul>

<hr/>

<p><span id="Label"></span>
<a name="Label"></a></p>
<h2>Label</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li><p>text</p></li>
    <li><p>fontsize</p></li>
    <li><p>fontname</p></li>
    <li><p>bold</p></li>
    <li><p>underline</p></li>
    <li><p>deleteline</p></li>
    <li><p>italics</p></li>
    <li><p>color</p></li>
    <li><p>linespacing</p></li>
    <li><p>wordwrap</p></li>
    <li><p>textalign  </p>
    <blockquote>
        <p>值对应CATextAlignment</p>
    </blockquote></li>
    <li><p>verttextalign</p>
    <blockquote>
        <p>值对应CAVerticalTextAlignment</p>
    </blockquote></li>
    <li><p>dimensions</p></li>
    <li><p>linecount</p></li>
    <li><p>enablecopy</p></li>
</ul>

<hr/>

<p><span id="LinearView"></span>
<a name="LinearView"></a></p>
<h2>LinearView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>type vertical垂直布局，hor水平布局</li>
    <li>childcenter bool子控件是否剧中对齐</li>
    <li>childpadding 子控件间隔</li>
    <li>inset 子控件偏移量</li>
</ul>


<hr/>

<p><span id="ListViewCell"></span>
<a name="ListViewCell_______Cell___Cell________________"></a></p>
<h2>ListViewCell继承<a href="#Cell">Cell</a>的所有属性</h2>

<hr/>

<p><span id="ListView"></span>
<a name="ListView"></a></p>
<h2>ListView</h2>

<p>继承<a href="#ScrollView">ScrollView</a>的所有属性，HeaderView，FooterView,<a href="#PullToRefreshView">HeaderRefreshView</a>,<a href="#PullToRefreshView">FooterRefreshView</a></p>

<h3>属性</h3>


<ul>
    <li>allowselection</li>
    <li>allowmultiselection</li>
    <li>showindicators</li>
    <li>orientation</li>
    <li>separatorcolor</li>
    <li>headerheight</li>
    <li>footerheight</li>
    <li>separatorheight</li>
</ul>

<h3>事件</h3>

<ul>
    <li>didSelectCellAtIndex (ListView,index)</li>
    <li>didDeselectCellAtIndex (ListView,index)</li>
    <li>numberOfIndex (ListView)</li>
    <li>heightForIndex (ListView,index)</li>
    <li>cellAtIndex (ListView,Size,index)</li>
    <li>willDisplayCellAtIndex (ListView,ListViewCell，index)</li>
</ul>

<hr/>

<p><span id="PageView"></span>
<a name="PageView"></a></p>
<h2>PageView</h2>

<p>继承<a href="#ScrollView">ScrollView</a>的所有属性，子控件为页面内容</p>

<h3>属性</h3>


<ul>
    <li>type</li>
</ul>

<blockquote>
    <p>值为vertical,horizontal</p>
</blockquote>

<ul>
    <li>spacing</li>
    <li>curpage</li>
    <li>showindicators</li>
</ul>

<h3>事件</h3>

<ul>
    <li>didBeginTurning (PageView)</li>
    <li>didEndTurning (PageView)</li>
    <li>didSelectedPageAtIndex (PageView,index,point)</li>
</ul>

<hr/>

<p><span id="PickerView"></span>
<a name="PickerView"></a></p>
<h2>PickerView</h2>

<p>继承<a href="#View">View</a>的所有属性，子控件为页面内容</p>

<h3>属性</h3>

<ul>
    <li>bkcolor</li>
    <li>fontsizenormal</li>
    <li>fontsizeselected</li>
    <li>fontcolornormal</li>
    <li>fontcolorselected</li>
    <li>separatecolor</li>
</ul>

<h3>事件</h3>

<ul>
    <li>didSelectRow (PickerView,row,component)</li>
    <li>numberOfComponents (PickerView) --返回选择控件的列数</li>
    <li>numberOfRowsInComponent (PickerView,component)</li>
    <li>widthForComponent (PickerView,component)</li>
    <li>rowHeightForComponent (PickerView,component)</li>
    <li>titleForRow (PickerView,row,component)</li>
    <li>viewForRow (PickerView,row,component)</li>
    <li>viewForSelect (PickerView,row,component)</li>
</ul>

<p><span id="PullToRefreshView"></span>
<a name="PullToRefreshView"></a></p>
<h2>PullToRefreshView</h2>

<p>继承<a href="#View">View</a>的所有属性，子控件<a href="#ActivityIndicatorView">ActivityIndicatorView</a></p>

<h3>属性</h3>

<ul>
    <li>type</li>
</ul>

<blockquote>
    <p>值为header,footer,custom</p>
</blockquote>


<ul>
    <li>pulltext</li>
    <li>releasetext</li>
    <li>text</li>
    <li>labelcolor</li>
    <li>pullimage</li>
    <li>layouttype</li>
</ul>

<blockquote>
    <p>值对应CALayoutLinearType</p>
</blockquote>


<hr/>

<p><span id="RichLabel"></span>
<a name="RichLabel"></a></p>
<h2>RichLabel</h2>

<p>继承<a href="#View">View</a>的所有属性，子控件为Text内容如下：</p>


<pre>
&lt;RichLabel&gt;
    &lt;Text bold=<span class="string">"true"</span> underLine=<span class="string">"false"</span> font=<span class="string">"test"</span> color=<span class="string">"#ffff0000"</span>&gt;你好&lt;/Text&gt;
    &lt;Text bold=<span class="string">"true"</span> underLine=<span class="string">"false"</span> font=<span class="string">"test"</span> color=<span class="string">"#ffff0000"</span>&gt;世界&lt;/Text&gt;
&lt;/RichLabel&gt;
</pre>

<h3>属性</h3>

<ul>
    <li>autolinkmask</li>
    <li>linkclickable</li>
    <li>linkcolor</li>
    <li>linkvisitedcolor</li>
</ul>


<hr/>

<p><span id="Scale9ImageView"></span>
<a name="Scale9ImageView"></a></p>
<h2>Scale9ImageView</h2>

<p>继承<a href="#View">View</a>的所有属性，子控件为页面内容</p>

<h3>属性</h3>

<ul>
    <li>image</li>
    <li>inset</li>
    <li>color</li>
    <li>alpha</li>
</ul>


<hr/>

<p><span id="TableView"></span>
<a name="TableView"></a></p>
<h2>TableView</h2>

<p>继承<a href="#ScrollView">ScrollView</a>的所有属性，子控件有<a href="#PullToRefreshView">HeaderRefreshView</a>，<a href="#PullToRefreshView">FooterRefreshView</a>，HeaderView，FooterView</p>

<h3>属性</h3>

<ul>
    <li>allowselection</li>
    <li>allowmultiselection</li>
    <li>showsindicators</li>
    <li>headerheight</li>
    <li>footerheight</li>
    <li>separatorcolor</li>
    <li>alwaystopsectionheader</li>
    <li>alwaysbottomsectionfooter</li>
    <li>switchpcmode</li>
</ul>

<h3>事件</h3>

<ul>
    <li>didSelectRowAtIndexPath (TableView,section,row)</li>
    <li>didDeselectRowAtIndexPath (TableView,section,row)</li>
    <li>tableCellAtIndex (TableView,cellSize,section,row)</li>
    <li>heightForRowAtIndexPath (TableView,section,row)</li>
    <li>numberOfRowsInSection (TableView,section)</li>
    <li>numberOfSections (TableView)</li>
    <li>sectionViewForHeaderInSection (TableView,viewSize,section)</li>
    <li>heightForHeaderInSection (TableView,section)</li>
    <li>sectionViewForFooterInSection  (TableView,viewSize,section)</li>
    <li>heightForFooterInSection (TableView,section)</li>
    <li>willDisplayCellAtIndex (TableView,section,row)</li>
</ul>

<p><span id="WaterfallViewCell"></span>
<a name="WaterfallViewCell"></a></p>
<h2>WaterfallViewCell</h2>

<p>继承<a href="#Cell">Cell</a>的所有属性</p>

<hr/>

<p><span id="WaterfallView"></span>
<a name="WaterfallView"></a></p>
<h2>WaterfallView</h2>

<p>继承<a href="#ScrollView">ScrollView</a>的所有属性，子控件有<a href="#PullToRefreshView">HeaderRefreshView</a>，<a href="#PullToRefreshView">FooterRefreshView</a>，HeaderView，FooterView</p>

<h3>属性</h3>

<ul>
    <li>allowselection</li>
    <li>allowmultiselection</li>
    <li>showsindicators</li>
    <li>headerheight</li>
    <li>footerheight</li>
    <li>columncount</li>
    <li>itemmargin</li>
    <li>columnmargin</li>
    <li>alwaystopsectionheader</li>
    <li>alwaysbottomsectionfooter</li>
    <li>switchpcmode</li>
</ul>

<h3>事件</h3>

<ul>
    <li>didSelectCellAtIndexPath (WaterfallView,itemIndex)</li>
    <li>didDeselectCellAtIndexPath (WaterfallView,itemIndex)</li>
    <li>cellAtIndex (WaterfallView,cellSize,itemIndex)</li>
    <li>heightForItemAtIndex (WaterfallView,itemIdx)</li>
    <li>numberOfItems (WaterfallView)</li>
    <li>sectionViewForHeader (WaterfallView,viewSize)</li>
    <li>heightForHeader (WaterfallView)</li>
    <li>sectionViewForFooter (WaterfallView,viewSize)</li>
    <li>heightForFooter (WaterfallView)</li>
    <li>willDisplayCellAtIndex (WaterfallView,cell,itemIdx)</li>
</ul>

<hr/>

<p><span id="WebView"></span>
<a name="WebView"></a></p>
<h2>WebView</h2>

<p>继承<a href="#View">View</a>的所有属性，子控件有ActivityView</p>

<h3>属性</h3>

<ul>
    <li>schame</li>
    <li>url</li>
    <li>file</li>
    <li>scaletofit</li>
</ul>

<h3>事件</h3>

<ul>
    <li>onShouldStartLoading (webView,url) --返回真表示可以加载，返回假表示不可以加载</li>
    <li>onDidFinishLoading (webView,url) --加载成功</li>
    <li>onDidFailLoading (webView,url)  --加载失败</li>
    <li>onJSCallback (webView,message)  --js回调</li>
</ul>


<hr/>

<p><span id="TextView"></span>
<a name="TextView"></a></p>
<h2>TextView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>text</li>
    <li>textcolor</li>
    <li>fontsize</li>
    <li>textalign</li>
    <li>returntype</li>
    <li>bkimage</li>
</ul>

<h3>事件</h3>

<ul>
    <li>onShouldBeginEditing (TextView)</li>
    <li>onShouldEndEditing (TextView)</li>
    <li>onShouldReturn (TextView)</li>
    <li>keyBoardHeight (TextView,height)</li>
</ul>


<hr/>

<p><span id="TextField"></span>
<a name="TextField"></a></p>
<h2>TextField</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>text</li>
    <li>textcolor</li>
    <li>fontsize</li>
    <li>textalign</li>
    <li>returntype</li>
    <li>bkimage</li>
    <li>clearbuttonmode</li>
    <li>marginleft</li>
    <li>marginright</li>
    <li>placeholdertext</li>
    <li>placeholdercolor</li>
    <li>keyboardtype</li>
    <li>password</li>
    <li>allowkeyboardhide</li>
    <li>maxlength</li>
</ul>


<h3>事件</h3>

<ul>
    <li>onShouldBeginEditing (TextField)</li>
    <li>onShouldEndEditing (TextField)</li>
    <li>onShouldReturn (TextField)</li>
    <li>keyBoardHeight (TextField,height)</li>
</ul>

<hr/>

<p><span id="ClippingView"></span>
<a name="ClippingView"></a></p>
<h2>ClippingView</h2>

<p>继承<a href="#View">View</a>的所有属性，可以包含子视图。</p>

<h3>属性</h3>

<ul>
    <li>stencil  包含模板视图，支持image='IMResources/head.png'及scale9="IMResources/head2.png" inset="5,5,5,5"写法</li>
    <li>inverted  是否反转</li>
    <li>alphathreshold  alpha的阈值小于该值的显示透明</li>
    <li>clippingenabled  是否开启裁剪</li>
</ul>

<h3>事件</h3>

<hr/>

<p><span id="CaptureView"></span>
<a name="CaptureView"></a></p>
<h2>CaptureView</h2>

<h3>属性</h3>

<ul>
    <li>framesize 捕捉的视频帧的宽高度</li>
    <li>brighten 捕捉的视频的亮度</li>
    <li>skinsmooth 皮肤平滑程度</li>
</ul>

<h3>事件</h3>

<ul>
    <li>onScanQRCode(scanView,text)
    <hr/></li>
</ul>

<p><span id="QRCodeScanView"></span>
<a name="QRCodeScanView"></a></p>
<h2>QRCodeScanView</h2>

<p>继承<a href="#CaptureView">CaptureView</a>的所有属性</p>

<h3>属性</h3>

<ul>
    <li>scaninterval 扫描识别时间间隔</li>
</ul>


<h3>事件</h3>

<ul>
    <li>onScanQRCode(scanView,text)</li>
</ul>


<hr/>

<p><span id="QRCodeView"></span>
<a name="QRCodeView"></a></p>
<h2>QRCodeView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>
<p>- data 二维码内容
- level
- version
- autoextent
- maskingno</p>

<hr/>

<p><span id="TouchView"></span>
<a name="TouchView"></a></p>
<h2>TouchView</h2>

<p>继承<a href="#View">View</a>的所有属性</p>

<h3>属性</h3>


<h3>事件</h3>
<p>- touchBegan (CATouch,EventType) return bool
- touchMoved (CATouch,EventType)
- touchEnded (CATouch,EventType)
- touchCancelled (CATouch,EventType)</p>


<hr/>

<p><span id="FlexLayout"></span>
<a name="FlexLayout"></a></p>
<h2>FlexLayout</h2>

<p>继承<a href="#View">View</a>的所有属性，该视图的子视图使用style的css样式进行布局。</p>

<h3>属性</h3>


<h3>事件</h3>



<hr/>

<p><span id="ViewController"></span>
<a name="ViewController"></a></p>
<h2>ViewController</h2>
<p>包含TabBarItem，NavigationBarItem子标签</p>

<p>ViewController子类如，NavigationController和TabBarController的属性定义于<Views>的上级标签中及根标签中。</p>

<p><TabBarController navigationbarhidden="true"></p>

<pre>
&lt;Views&gt;
  ...
&lt;/Views&gt;
</pre>

<p></TabBarController></p>


<h4>ViewController属性有</h4>

<ul>
    <li>title</li>
</ul>

<h4>TabBarController属性有</h4>

<ul>
    <li>title</li>
    <li>tabbarhidden</li>
    <li>tabbarbackgroundimage</li>
    <li>tabbarbackgroundcolor</li>
    <li>tabbarselectedbackgroundimage</li>
    <li>tabbarselectedbackgroundcolor</li>
    <li>tabbarselectedindicatorimage</li>
    <li>tabbarSelectedindicatorcolor</li>
    <li>tabbartitlecolorfornormal</li>
    <li>tabbartitlecolorforselected</li>
    <li>tabbartitleboldforselected</li>
    <li>tabbarheight</li>
    <li>tabbarshowshadow</li>
</ul>

<h4>NavigationController属性有</h4>

<ul>
    <li>title</li>
    <li>navigationbarhidden</li>
    <li>touchmoved</li>
    <li>navigationbarbackgroundimage</li>
    <li>navigationbarbackgroundcolor</li>
    <li>navigationbartitlecolor</li>
    <li>navigationbarbuttoncolor</li>
</ul>


<h4>TabBarItem属性有</h4>

<ul>
    <li>image</li>
    <li>selectedimage</li>
    <li>title</li>
    <li>badgevalue</li>
</ul>

<h4>NavigationBarItem属性有</h4>

<ul>
    <li>title</li>
    <li>titleimage</li>
    <li>showgoback
    包含LeftButtonItem，RightButtonItem，TitleView子标签，可以包含多个LeftButtonItem及RightButtonItem标签，TitleView的子标签生成控件</li>
</ul>


<h5>LeftButtonItem和RightButtonItem的属性有</h5>

<ul>
    <li>title</li>
    <li>image</li>
    <li>highlighedimage</li>
    <li>width</li>
</ul>

<h3>示例</h3>


<pre>
&lt;xml&gt;
    &lt;TabBarItem title=<span class="string">"图片"</span> image=<span class="string">"image/tab_image_btn_up.png"</span> selectedimage=<span class="string">"image/tab_image_btn_down.png"</span>&gt;

    &lt;/TabBarItem&gt;
    &lt;NavigationBarItem title=<span class="string">"图片"</span>&gt;
        &lt;LeftButtonItem title=<span class="string">"返回"</span>&gt;
            &lt;Event buttonClicked=<span class="string">"navBack"</span>/&gt;
        &lt;/LeftButtonItem&gt;
        &lt;LeftButtonItem title=<span class="string">"关闭"</span>&gt;
            &lt;Event buttonClicked=<span class="string">"navClose"</span>/&gt;
        &lt;/LeftButtonItem&gt;
        &lt;RightButtonItem /&gt;
        &lt;TitleView&gt;
            &lt;Label text=<span class="string">"导航栏标题"</span>/&gt;
        &lt;/TitleView&gt;
    &lt;/NavigationBarItem&gt;
&lt;/xml&gt;
</pre>

<hr/>

<p><span id="Event"></span>
<a name="Event"></a></p>
<h2>Event</h2>
<p>Event标签内的包含控件绑定的控件事件处理，支持两种事件的绑定：
- 绑定事件到viewcontrol进行处理；
- 绑定一段lua脚本进行处理；</p>

<p>例如</p>


<pre>
&lt;Button&gt;
    &lt;Event touchUpInSide=<span class="string">"click"</span>/&gt;
&lt;/Button&gt;
</pre>

<p>和</p>


<pre>
&lt;Button&gt;
    &lt;Event&gt;
        &lt;touchUpInSide&gt;
            log(<span class="string">"button clicked"</span>)
        &lt;/touchUpInSide&gt;
    &lt;/Event&gt;
&lt;/Button&gt;
</pre>

<hr/>

<p><span id="Skin"></span>
<a name="Skin"></a></p>
<h2>Skin</h2>
<p>控件皮肤的定义通过skin标签进行配置</p>


<pre>
&lt;Skin name=<span class="string">"common"</span>
color=<span class="string">"clear"</span>
/&gt;

&lt;Skin name=<span class="string">"button"</span> extends=<span class="string">"common"</span>
normalimage=<span class="string">"test.png"</span>
hotlightedimage=<span class="string">"testhot.png"</span>
color=<span class="string">"#ffff0000"</span>
/&gt;
</pre>

<p>支持全局skin，及局部skin，全局skin定义在skin.xml中，局部的定义在布局文件内或者通过include包含。</p>

<p>使用skin只需在view属性里面添加skin属性即可如下：</p>


<pre>
&lt;Button skin=<span class="string">"button"</span>/&gt;
</pre>



</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-06-06 11:42:56 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
